package com.onluy.frameworkcloud.batis.holder;


import java.util.List;
import org.apache.ibatis.mapping.ResultMap;

public abstract class ResultMapHolder
{
    private static final ThreadLocal<List<ResultMap>> holder = new ThreadLocal();

    public static void set(List<ResultMap> resultMaps) {
        if (!resultMaps.equals(holder.get()))
            holder.set(resultMaps);
    }

    public static List<ResultMap> get()
    {
        return (List)holder.get();
    }

    public static void clear() {
        holder.remove();
    }
}